import 'babel-polyfill';
import Es6Promise from 'es6-promise'
Es6Promise.polyfill();
// var VConsole = require('../node_modules/vconsole/dist/vconsole.min');
// var vConsole = new VConsole();
// Vue.use(vConsole);
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { Dialog } from "vant"
import { Toast } from 'vant'
import { Uploader } from 'vant';
import { Field,Picker,Button   } from "vant";
import VueResource from 'vue-resource'

import './css/public.css'
import wx from 'weixin-js-sdk'
Vue.prototype.$wx = wx
Vue.prototype.$msg = Dialog
Vue.config.productionTip = false
Vue.use(Toast);
Vue.use(Field);
Vue.use(Picker);
Vue.use(Button);
Vue.use(Dialog);
Vue.use(Uploader);
Vue.use(VueResource);

// 根据路由设置标题
router.beforeEach(function(to, from, next) {
  /*路由发生改变修改页面的title */
  if(to.meta.title) {
    document.title = to.meta.title
  }
  next();
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
